home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / ufo_comm.swf / scripts / frame_147 / DoAction.as
Encoding:
Text File  |  2007-04-25  |  8.9 KB  |  268 lines

  1. var ┬º\x01┬º = 63;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 63)
  5.    {
  6.       set("\x01",eval("\x01") + 733);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else if(eval("\x01") == 307)
  10.    {
  11.       set("\x01",eval("\x01") + 635);
  12.       ┬º┬ºpush(true);
  13.    }
  14.    else
  15.    {
  16.       if(eval("\x01") == 852)
  17.       {
  18.          set("\x01",eval("\x01") - 545);
  19.          break;
  20.       }
  21.       if(eval("\x01") == 942)
  22.       {
  23.          set("\x01",eval("\x01") - 480);
  24.          if(┬º┬ºpop())
  25.          {
  26.             set("\x01",eval("\x01") + 391);
  27.          }
  28.       }
  29.       else
  30.       {
  31.          if(eval("\x01") == 253)
  32.          {
  33.             set("\x01",eval("\x01") + 594);
  34.             _root.level = 5;
  35.             _root.primaData = true;
  36.             _root.ufo.swapDepths(999);
  37.             _root.life = 100;
  38.             _root.lifeBar.gotoAndStop(_root.life);
  39.             _root.lifeText = _root.life + "%";
  40.             _root.oiRapite = 0;
  41.             _root.smokeDepth = 500;
  42.             _root.speedX = 0;
  43.             _root.speedY = 0.7;
  44.             _root.accel = 1;
  45.             _root.counterPozitii = 0;
  46.             _root.beamCounter = 0;
  47.             _root.beamOpen = false;
  48.             _root.rotation = false;
  49.             _root.float = false;
  50.             h = 1;
  51.             while(h <= 4)
  52.             {
  53.                _root.attachMovie("rosu" + h,"rosu" + h,_root.getNextHighestDepth());
  54.                _root["rosu" + h]._alpha = 0;
  55.                h++;
  56.             }
  57.             _root.onEnterFrame = function()
  58.             {
  59.                if(ok)
  60.                {
  61.                   _root.lifeText = _root.life + "%";
  62.                   _root.ufo._x += _root.speedX;
  63.                   _root.ufo._y += _root.speedY;
  64.                   _root.rotatie = _root.ufo._rotation;
  65.                   if(Key.isDown(37))
  66.                   {
  67.                      _root.rotation = false;
  68.                      if(_root.speedX > -3)
  69.                      {
  70.                         if(_root.counterPozitii == 0)
  71.                         {
  72.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatS");
  73.                         }
  74.                         _root.counterPozitii = 1;
  75.                         _root.speedX -= _root.accel;
  76.                         if(!_root.beamOpen && _root.ufo._rotation > -12)
  77.                         {
  78.                            _root.ufo._rotation -= 1;
  79.                         }
  80.                      }
  81.                   }
  82.                   if(Key.isDown(39))
  83.                   {
  84.                      _root.rotation = false;
  85.                      if(_root.speedX < 3)
  86.                      {
  87.                         if(_root.counterPozitii == 0)
  88.                         {
  89.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatD");
  90.                         }
  91.                         _root.counterPozitii = 1;
  92.                         _root.speedX += _root.accel;
  93.                         if(_root.beamOpen == false && _root.ufo._rotation < 12)
  94.                         {
  95.                            _root.ufo._rotation += 1;
  96.                         }
  97.                      }
  98.                   }
  99.                   if(Key.isDown(38))
  100.                   {
  101.                      if(_root.speedY > -3)
  102.                      {
  103.                         if(_root.counterPozitii == 0)
  104.                         {
  105.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatSus");
  106.                         }
  107.                         _root.counterPozitii = 1;
  108.                         _root.speedY -= _root.accel;
  109.                      }
  110.                   }
  111.                   if(Key.isDown(40))
  112.                   {
  113.                      if(_root.speedY < 3)
  114.                      {
  115.                         if(_root.counterPozitii == 0)
  116.                         {
  117.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatJos");
  118.                         }
  119.                         _root.counterPozitii = 1;
  120.                         _root.speedY += _root.accel;
  121.                      }
  122.                   }
  123.                   if(Key.isDown(32))
  124.                   {
  125.                      if(_root.ufo._rotation == 0)
  126.                      {
  127.                         if(_root.beamCounter == 0)
  128.                         {
  129.                            _root.ufo.raza.gotoAndPlay(2);
  130.                            _root.beamCounter = 1;
  131.                         }
  132.                      }
  133.                   }
  134.                   if(_root.speedX < 0)
  135.                   {
  136.                      if(_root.ufo._rotation < 0 && _root.rotation == true)
  137.                      {
  138.                         _root.ufo._rotation = _root.ufo._rotation + 1;
  139.                      }
  140.                      _root.speedX += 0.2;
  141.                      if(_root.speedX >= 0)
  142.                      {
  143.                         _root.speedX = 0;
  144.                         _root.ufo.ufo2.ufo3.gotoAndStop(1);
  145.                         _root.ufo._rotation = 0;
  146.                      }
  147.                   }
  148.                   if(_root.speedX > 0)
  149.                   {
  150.                      if(_root.ufo._rotation > 0 && _root.rotation == true)
  151.                      {
  152.                         _root.ufo._rotation--;
  153.                      }
  154.                      _root.speedX -= 0.2;
  155.                      if(_root.speedX <= 0)
  156.                      {
  157.                         _root.speedX = 0;
  158.                         _root.ufo.ufo2.ufo3.gotoAndStop(1);
  159.                         _root.ufo._rotation = 0;
  160.                      }
  161.                   }
  162.                   if(_root.speedY < 0)
  163.                   {
  164.                      _root.speedY += 0.2;
  165.                      if(_root.speedY >= 0)
  166.                      {
  167.                         _root.speedY = 0.7;
  168.                      }
  169.                   }
  170.                }
  171.                else
  172.                {
  173.                   _root.ufo._y -= 5;
  174.                   _root.ufo._alpha -= 5;
  175.                }
  176.             };
  177.             if(_root.primaData)
  178.             {
  179.                _root.attachMovie("d" + _root.level,"d" + _root.level,93);
  180.             }
  181.             _root.d1._x = 405;
  182.             _root.d1._y = 257;
  183.             _root["d" + _root.level]._x = 226;
  184.             _root["d" + _root.level]._y = 303;
  185.             _root.starArray = new Array();
  186.             _root.starArray = ["s4","s4","s4","s4"];
  187.             _root.removeArray = new Array();
  188.             _root.removeArray = ["o1","o2","o3","o4","o5","o6","bomb1","bomb2","bomb3","ufo","ufo2","poarta"];
  189.             listener = new Object();
  190.             listener.onKeyUp = function()
  191.             {
  192.                if(Key.getCode() == 37 || Key.getCode() == 38 || Key.getCode() == 39 || Key.getCode() == 40)
  193.                {
  194.                   _root.ufo.ufo2.ufo3.play();
  195.                   _root.counterPozitii = 0;
  196.                   _root.rotation = true;
  197.                }
  198.                if(Key.getCode() == 32)
  199.                {
  200.                   _root.ufo.raza.play();
  201.                }
  202.             };
  203.             Key.addListener(listener);
  204.             _root.oiCounter = 30;
  205.             _root.bombCounter = 20;
  206.             _root.smokeCounter = 3500;
  207.             _root.starCounter = 3500;
  208.             _root.oiTarget = 4;
  209.             _root.oiPeScena = 4;
  210.             _root.bombe = 3;
  211.             stop();
  212.             break;
  213.          }
  214.          if(eval("\x01") == 462)
  215.          {
  216.             set("\x01",eval("\x01") + 391);
  217.             ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop()[┬º┬ºpop() - ┬º┬ºpop()] - 10;
  218.             eval(┬º┬ºconstant(0))[┬º┬ºconstant(19)][┬º┬ºconstant(18)]();
  219.             eval(┬º┬ºconstant(0))[┬º┬ºconstant(8)](┬º┬ºconstant(20));
  220.             eval(┬º┬ºconstant(0))[┬º┬ºconstant(10)] = 0;
  221.             eval(┬º┬ºconstant(0))[┬º┬ºconstant(11)] += eval(┬º┬ºconstant(0))[┬º┬ºconstant(10)];
  222.             eval(┬º┬ºconstant(0))[┬º┬ºconstant(9)] = 100;
  223.             if(_root.smokeDepth >= 500)
  224.             {
  225.                removeMovieClip(_root);
  226.             }
  227.             break;
  228.          }
  229.          if(eval("\x01") == 853)
  230.          {
  231.             set("\x01",eval("\x01") - 597);
  232.             ┬º┬ºpush(true);
  233.          }
  234.          else if(eval("\x01") == 256)
  235.          {
  236.             set("\x01",eval("\x01") + 146);
  237.             if(┬º┬ºpop())
  238.             {
  239.                set("\x01",eval("\x01") - 149);
  240.             }
  241.          }
  242.          else
  243.          {
  244.             if(eval("\x01") != 796)
  245.             {
  246.                if(eval("\x01") == 402)
  247.                {
  248.                   set("\x01",eval("\x01") - 149);
  249.                   stop();
  250.                   ┬º┬ºpush(┬º┬ºpop() - ┬º┬ºpop());
  251.                   break;
  252.                }
  253.                if(eval("\x01") == 847)
  254.                {
  255.                   set("\x01",eval("\x01") - 847);
  256.                }
  257.                break;
  258.             }
  259.             set("\x01",eval("\x01") + 56);
  260.             if(┬º┬ºpop())
  261.             {
  262.                set("\x01",eval("\x01") - 545);
  263.             }
  264.          }
  265.       }
  266.    }
  267. }
  268.